#include "senddialog.h"
#include "ui_senddialog.h"

SendDialog::SendDialog(QString name, int sell, QWidget *parent) :
    QDialog(parent),
    ui(new Ui::SendDialog)
{
    ui->setupUi(this);

    this->setAttribute(Qt::WA_StyledBackground, true);
    this->setObjectName("widget");
    this->setStyleSheet("#widget{background-image: url(:/res/beijing.jpg);}");

    //this->setFixedSize(600, 400);
    QString data = QString("借出《%1》将扣除%2积分\n确定借出吗？").arg(name).arg(sell);
    ui->label->setText(data);
}

SendDialog::~SendDialog()
{
    delete ui;
}

void SendDialog::on_pushButton_clicked()
{
    this->close();
    emit sendBtn_click();    
}

void SendDialog::on_pushButton_2_clicked()
{
    close();
}
